//
//  SCPhotoView.h
//  PhotoAlbum
//
//  Created by Chao Sheng on 2021/12/8.
//

#import <UIKit/UIKit.h>
#import "SCPhotoSubCell.h"

NS_ASSUME_NONNULL_BEGIN

@class SCPhotoView;
@protocol SCPhotoViewDelegate <NSObject>

/// 返回显示的全部图片
/// @param photoView view对象
/// @param photoList 图片对象的数组
/// @param completion 是否完成识别
- (void)scPhotoView:(SCPhotoView*)photoView allPhotos:(NSArray<SCPhotoModel*>*)photoList PhotosRecognitionCompletion:(BOOL)completion;


/// 图片数据变化
/// @param photoView view对象
/// @param newPhotoList 新增的图片
/// @param delPhotoList 删除的图片
- (void)scPhotoView:(SCPhotoView*)photoView newPhotos:(NSArray<SCPhotoModel*>*)newPhotoList deletePhotos:(NSArray<SCPhotoModel*>*)delPhotoList;

@end

@interface SCPhotoView : UIView

- (instancetype)initWithManager:(SCPhotoManager*)manager;

- (NSIndexPath*)currentIndexPathInModel:(SCPhotoModel*)model;

@property (nonatomic, assign) id<SCPhotoViewDelegate>delegate;

@property (nonatomic, strong) UICollectionView *collectionView;

@property (nonatomic, strong) SCPhotoManager *manager;

/// manager数据变化时，调用刷新页面
- (void)reloadView;

/// 还原页面
- (void)resetView;

/// 自定义转场动画时用到的属性
@property (strong, nonatomic) NSIndexPath *currentIndexPath;


@end

NS_ASSUME_NONNULL_END
